package thecardgame;

//纸牌类
public class Card {
    public String suit;//纸牌的花色
    public int rank;//纸牌的数字

    //构造方法
    public Card(String suit, int rank) {
        this.suit = suit;
        this.rank = rank;
    }

    //重写toString方法
    @Override
    public String toString() {
        /*return "Card{" +
                "suit='" + suit + '\'' +
                ", rank=" + rank +
                '}';*/
        return "{" + suit + rank + "}";
    }
}
